package com.yangbo;

import java.util.Scanner;

public class FactoryMethodPattern {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        for(int i =0;i<n;i++)
        {
            String[] s = sc.nextLine().split(" ");

            String name = s[0];
            Integer m = Integer.parseInt(s[1]);
            for(int j=0;j<m;j++)
            {
                if(name.equals("Circle"))
                {
                    new CircleBlockFactory().createBlock().produce();
                }
                if(name.equals("Squrae")){

                    new SquareBlockFactory().createBlock().produce();

                }

            }
        }

    }
}
interface Block
{
    void produce();
}
class CircleBlock implements Block{

    @Override
    public void produce() {
        System.out.println("Circle com.yangbo.Block");
    }
}
class SquareBlock implements  Block{

    @Override
    public void produce() {
        System.out.println("Square com.yangbo.Block");

    }
}
interface BlockFactory
{
    Block createBlock();
}
class CircleBlockFactory implements BlockFactory{

    @Override
    public Block createBlock() {
        return new CircleBlock();
    }
}
class SquareBlockFactory implements BlockFactory{

    @Override
    public Block createBlock() {
        return new SquareBlock();
    }
}
